package com.tao.modular

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.tao.common.BaseActivity
import com.tao.common.router.RouterActivityPath
import com.tao.modular.databinding.ActivityMainBinding

/**
 * !!!注意一定要进行替换setContentView(binding.root)!!!
 */
@Route(path = RouterActivityPath.Main.PAGE_MAIN)
class MainActivity : BaseActivity<ActivityMainBinding>() {

    override val binding: ActivityMainBinding by lazy {
        ActivityMainBinding.inflate(layoutInflater)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.north.setOnClickListener {
            ARouter.getInstance().build(RouterActivityPath.North.PAGE_NORTH).navigation()
        }
        binding.south.setOnClickListener {
            ARouter.getInstance().build(RouterActivityPath.South.PAGE_SOUTH).navigation()
        }
    }
}